package com.aphrodite.io.sip.header;

import com.aphrodite.io.sip.provider.SipParser;

/** SIP Header Content-Length */
public final class ContentLengthHeader extends Header {
	// public ContentLengthHeader()
	// { super(SipHeaders.Content_Length);
	// }

	public ContentLengthHeader(Header hd) {
		super(hd);
	}

	public ContentLengthHeader(int len) {
		super(SipHeaders.Content_Length, String.valueOf(len));
	}

	/** Gets content-length of ContentLengthHeader */
	public int getContentLength() {
		return (new SipParser(value)).getInt();
	}

	/** Set content-length of ContentLengthHeader */
	public void setContentLength(int cLength) {
		value = String.valueOf(cLength);
	}

}
